package mediator;

public class Client {
    public static void main(String[] args) {
        SmartHomeMediator mediator = new ConcreteMediator();
        Alarm device = new Alarm("闹钟", mediator);
        Curtains curtains = new Curtains("窗帘", mediator);
        TV tv = new TV("电视", mediator);
        CoffeeMachine coffeeMachine = new CoffeeMachine("咖啡机", mediator);
        // 闹钟响起,开始打开窗帘、打开咖啡机、打开电视
        device.startMorning();
        device.performAction(1);
    }
}
